Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up some http code+tests, and add auth setup documentation #40

Merged
merged 1 commit into from
May 13, 2024

Conversation

mbiannaccone
Copy link
Collaborator

No description provided.

@@ -32,7 +34,23 @@ def get_config() -> configparser.ConfigParser:
"""Reads the config file and returns a ConfigParser object."""
config = configparser.ConfigParser()
if not config.read(CONFIG_PATH):
raise Exception(f"Please add your configuration file at '{CONFIG_PATH}'")
raise Exception(
f"""Please add your configuration file at '{CONFIG_PATH}' with the following format:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmagier1 , you'll appreciate this.

@@ -65,14 +83,16 @@ def get_default_host(host: str | None = None) -> str:
(host for host in hosts if config.getboolean(host, "is_default", fallback=False) is True),
hosts[0],
)
if first_default_host == 'localhost':
if first_default_host == "localhost":
Copy link
Collaborator

@aduane aduane May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In ruby ' and " are slightly different. You only use " if you're going to do string interpolation. This is very ingrained into me, so I'm always using ' by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using black and isort on this project?

I always type ' to avoid an extra keystroke (shift), and then let the autoformatter deal with it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears we are and I just haven't installed the pre-commit hooks. My bad.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your focus on developer efficiency, btw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes laziness and efficiency are the same thing

@aduane aduane merged commit 684ea0f into main May 13, 2024
2 checks passed
@aduane aduane deleted the michela/auth-documentation-and-http-cleanup branch May 13, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants